#ifndef CONFIGCONTROLLER_H
#define CONFIGCONTROLLER_H

#include "interfaces.h"
#include "configdata.h"
#include "configview.h"

class ConfigView;

class ConfigController: public ConfigControllerInterface
{
public:
    ConfigController(ConfigData *data, ConfigView *view);
    ~ConfigController();
    void setTranSetting(int tranType, const TTranSetting& setting);
    void setGenConfig(int genId, const TGenConfig& config);
    TTranSetting getTranSetting(int tranType);
    TGenConfig getGenConfig(int genId);
    void setDuration(int duration);
    int getDuration();
    void setIncUser(int user);
    int getIncUser();
    void setIncTime(int sec);
    int getIncTime();
    int addGen(std::string ip="", int userCount = 0);
    void delGen(int genId);

private:
    ConfigData *m_configData;
    ConfigView *m_configView;
};

#endif // CONFIGCONTROLLER_H
